#include "QtPresentationFactory.h" 

QtPresentationFactory::QtPresentationFactory(QWidget *): mapSelector(0), playersSelector(0)
{
	//FIXME: QWidget * is unused...
	vboxLayout = new QVBoxLayout;

	setLayout(vboxLayout);
}

QtPresentationFactory::~QtPresentationFactory()
{

}

void QtPresentationFactory::CreateMapSelector()
{
	//fixme : mapSelector nooit op 0 gezet, zie random memory :P
	if (mapSelector == 0)
	{
		mapSelector = new QtMapSelector();
		mapSelector->hide();
		vboxLayout->addWidget(mapSelector);
	}
}

MapSelector* QtPresentationFactory::GetMapSelector()
{
	return mapSelector;
}

void QtPresentationFactory::CreatePlayersSelector()
{
	if (playersSelector == 0)
	{
		playersSelector = new QtPlayersSelector();
		playersSelector->hide();
		vboxLayout->addWidget(playersSelector);
	}
}

PlayersSelector* QtPresentationFactory::GetPlayersSelector()
{
	return playersSelector;
}


